<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            position: relative;
            height: 100px;
            width: 100px;
            background-color: pink;
            text-align: center;
            margin: 100px auto;
        }
        p {
            color: red;
          font-size: 14px;  
        }
        .box img {
            margin-top: -5px;
        }
        .box i{
            position: absolute;
            right: 100px;
            width: 15px;
            height: 15px;
            font-size: 14px;
            border: 1px solid #ccc;
            text-align: center;
            cursor: pointer;
        }
    </style>
</head>
<body>
    <div class="box">
        <i class="cha">×</i>
        <p>京东广告</p>
        <img src="images/head.png" alt="">
    </div>
    <script>
        var cha = document.querySelector('.cha');
        var box = document.querySelector('.box');
        cha.onclick = function() {
            box.style.display = 'none';
        }
    </script>
</body>
</html>